from pydantic import BaseModel
from typing import Optional


class AppConfig(BaseModel):
    name: str
    host: str
    port: int
    debug: Optional[bool] = False


class LogConfig(BaseModel):
    level: str
    path: str


class Config(BaseModel):
    app: AppConfig
    log: LogConfig
